package com.ityueqiangu.portal.conroller;

import com.ityueqiangu.core.web.controller.BaseController;
import com.ityueqiangu.core.web.result.DataGridResultInfo;
import com.ityueqiangu.project.galleryinfo.domain.GalleryInfo;
import com.ityueqiangu.project.galleryinfo.service.IGalleryInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Clever、xia
 * @title: GalleryInfoController
 * @projectName art-exhibition-system
 * @description:
 * @date 2021-03-16 17:47
 */
@Controller
@RequestMapping(value = "/portal/galleryInfo")
public class FrontGalleryInfoController extends BaseController {

    @Autowired
    private IGalleryInfoService galleryInfoService;

    /**
     * 分页列表查询
     * @param galleryInfo
     * @return 返回DataGridResultInfo
     */
    @RequestMapping("/list")
    @ResponseBody
    public DataGridResultInfo list(GalleryInfo galleryInfo) {
        startPage();
        //编写查询条件
        List<GalleryInfo> list = galleryInfoService.selectGalleryInfoList(galleryInfo);
        return getDataTable(list);
    }
}
